$(document).ready(function(){
	initGrid({
		url: 'getJson.json'
	});
	
	addSubmit();
	showEditModal('department');
});
function initGrid(options){
	
	var colModel = [
	                { label: '序号', name: 'id', key: true, fixed:true, width: 55, align:'center' },
	                { label: '编号', name: 'code', width: 150, editable: true },
	                { label: '上一级部门', name: 'parent.name', index:'parent_code', width: 150 },
	                { label: '名称', name: 'name', width: 150 },
	                { label:'添加时间', name: 'addtime', width: 150 },
	                { label:'操作', name: '', width: 80, fixed:true, formatter: customActions },
	            ];
	options.colModel = colModel;
	customGrid.init(options);
}